import request from '@/utils/request'

export const getTaskList = (query) => {
  return request({
    url: '/business/project/task/list',
    method: 'get',
    params: query
  })
}

export const getTaskById = (taskId, query) => {
  return request({
    url: `/business/project/task/${taskId}`,
    method: 'get',
    params: query
  })
}

export const addTask = (data) => {
  return request({
    url: '/business/project/task',
    method: 'post',
    data: data
  })
}

export const modifyTask = (data) => {
  return request({
    url: '/business/project/task',
    method: 'put',
    data: data
  })
}

export const delTask = (taskIds) => {
  return request({
    url: `/business/project/task/${taskIds}`,
    method: 'delete'
  })
}
